package com.oop.demo03;

public class Student {

    private String name;
    private int id;
    private int age;


    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int  getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age>100||age<0){
            age=18;
        }
        this.age = age;
    }
}
